import Vue from 'vue'
import App from './App.vue'

Vue.config.productionTip = false

Vue.filter('sliceTime', function(val) {
  return val.slice(0, 4)
})
Vue.directive('fbind', {
  bind(element, binding) {
    element.value = binding.value
  },
  inserted(element) {
    element.focus()
  },
  update(element, binding) {
    element.value = binding.value
    element.focus()
  }
})
Vue.mixin({
  mounted() {
    console.log('mixin2') 
  }
})
Vue.prototype.$myMethod = function() {
  console.log('rice')
}
new Vue({
  render: h => h(App)
}).$mount('#app')
